<div class="panel no-bt mbl">
  <div class="row collapse">
    <div class="medium-12 columns">
      <h4 class="no-m pts pbs"><%= t(:change_settings) %></h4>
    </div>
  </div>
</div>
<%= form_for @tenant, url: settings_path do |f| %>
  <div class="row mt mb">

    <div class="medium-6 columns">

      <h5><%= t(:localization_settings) %></h5>

      <%= f.select :default_time_zone, @time_zones %>

      <%= f.check_box :ignore_user_agent_locale %>

      <%= f.select :default_locale, @locales %>

      <h5><%= t(:permissions) %></h5>

      <%= f.check_box :share_drafts %>

      <%= f.check_box :ticket_creation_is_open_to_the_world %>

      <%= f.check_box :ask_for_name %>

      <h5><%= t(:notification_settings) %></h5>

      <%= f.check_box :first_reply_ignores_notified_agents %>

      <%= f.check_box :notify_client_when_ticket_is_assigned_or_closed %>

      <%= f.check_box :notify_client_when_ticket_is_created %>

      <%= f.check_box :notify_user_when_account_is_created %>

      <% if AppSettings.enable_custom_stylesheet || AppSettings.enable_custom_javascript %>
        <h5><%= t(:look_and_feel) %></h5>

        <% if AppSettings.enable_custom_stylesheet %>
          <% if AppSettings.custom_stylesheet_url %>
            <%= f.text_field(:stylesheet_url, value: AppSettings.custom_stylesheet_url, disabled: true) %>
          <% else %>
            <%= f.text_field(:stylesheet_url) %>
          <% end %>
        <% end %>

        <% if AppSettings.enable_custom_javascript %>
          <% if AppSettings.custom_javascript_url %>
            <%= f.text_field(:javascript_url, value: AppSettings.custom_javascript_url, disabled: true) %>
          <% else %>
            <%= f.text_field(:javascript_url) %>
          <% end %>
        <% end %>
      <% end %>

    </div>

    <div class="medium-6 columns">
    </div>
  </div>
  <div class="row">
    <div class="medium-12 columns bt">
      <%= f.submit t(:save), class: 'success button radius mtl' %>
    </div>
  </div>
<% end %>
